-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix connection direction #7076
Fix connection direction #7076
Conversation
Signed-off-by: Young Bu Park <[email protected]>
@@ -2,7 +2,7 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nithyatsu @rynowak Please carefully review these test cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is right.
test/functional/shared/resources/testdata/corerp-resources-application-graph-out.json
Show resolved
Hide resolved
Radius functional test overview
Click here to see the list of tools in the current test run
Test Status⌛ Building Radius and pushing container images for functional tests... |
"id": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/containers/sql-ctnr" | ||
} | ||
], | ||
"connections": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is correct because no other container resources refers to http route.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really going to comment on the correctness of the HTTP route scenario. It would take extra work specific to HTTP Routes to get a useful output for this case.
We shouldn't fix it, we should complete the removal of the HTTP Route type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to make it correct, then httproute should have outbound and inbound both.
ID: &id, | ||
Direction: &dir, //Direction is set with respect to Resource defining this connection | ||
ID: to.Ptr(id), | ||
Direction: to.Ptr(corerpv20231001preview.DirectionInbound), //Direction is set with respect to Resource defining this connection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inbound connection should be Inbound
not Outbound
.
@@ -493,7 +492,7 @@ func connectionsFromAPIData(resource generated.GenericResource, allResources []g | |||
// If we encounter an error processing this data, just skip "invalid" connection entry. | |||
entries := []*corerpv20231001preview.ApplicationGraphConnection{} | |||
for _, connection := range connections { | |||
dir := corerpv20231001preview.DirectionInbound | |||
dir := corerpv20231001preview.DirectionOutbound |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the root cause of this bug.
@@ -140,6 +142,13 @@ func Test_computeGraph(t *testing.T) { | |||
envResourceDataFile: "", | |||
expectedDataFile: "graph-app-httproute-out.json", | |||
}, | |||
{ | |||
name: "using httproute 2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to change test case name to more meaningful one later.
Signed-off-by: Young Bu Park <[email protected]>
Signed-off-by: Young Bu Park <[email protected]>
Radius functional test overview
Click here to see the list of tools in the current test run
Test Status⌛ Building Radius and pushing container images for functional tests... |
# Description This is to fix appgraph connection direction. ## Type of change - This pull request fixes a bug in Radius and has an approved issue (issue link required). Fixes: radius-project#7038 --------- Signed-off-by: Young Bu Park <[email protected]>
# Description This is to fix appgraph connection direction. ## Type of change - This pull request fixes a bug in Radius and has an approved issue (issue link required). Fixes: radius-project#7038 --------- Signed-off-by: Young Bu Park <[email protected]> Signed-off-by: sk593 <[email protected]>
# Description This is to fix appgraph connection direction. ## Type of change - This pull request fixes a bug in Radius and has an approved issue (issue link required). Fixes: radius-project#7038 --------- Signed-off-by: Young Bu Park <[email protected]>
Description
This is to fix appgraph connection direction.
Type of change
Fixes: #7038